﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KPWeb.Class;
using KPWeb.Data;

namespace KPWeb.Reports
{
    public partial class RaportPDFExcel : KPPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!this.IsPostBack)
            //{

            //     ReportViewer1.LocalReport.DataSources.Clear();

            // ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("dListaUzupelniona", Model.GetEmploeeys()));


            //    string mime = null;
            //    string encoding = null;
            //    string extension = null;
            //    Microsoft.Reporting.WebForms.Warning[]  warnings=null;
            //    string[] streamids=null;
            //    byte[] result = this.ReportViewer1.LocalReport.Render("pdf", null, out mime, out encoding, out extension, out streamids, out warnings);
          
              
            //   Response.Clear();
            //   Response.ClearContent();
            //   Response.ClearHeaders();
            //   Response.Buffer = true;

            //   Response.ContentType = "application/pdf";
           
            //    Response.AddHeader("Content-Length", result.Length.ToString());

            //    Response.AddHeader("content-disposition", "attachment;filename=ListyObecn.pdf");
                
            //    Response.BinaryWrite(result);
            //    Response.Flush();
            //    Response.End();
            //}
        }
    }
}